import Vue from 'vue'

import VueI18n from 'vue-i18n'
import enLocale from 'element-ui/lib/locale/lang/en'
import zhLocale from 'element-ui/lib/locale/lang/zh-TW'
import cnLocale from 'element-ui/lib/locale/lang/zh-CN'

import enUs from './en-us'
import zhHk from './zh-hk'
import zhCn from './zh-cn'


Vue.use(VueI18n);

const messages = {
  en: {
    ...enUs,
    ...enLocale
  },
  zh_HK: {
    ...zhHk,
    ...zhLocale
  },
  zh_CN: {
    ...zhCn,
    ...cnLocale
  }
}
export default new VueI18n({
  locale:localStorage.getItem('language')||'zh_HK',
  messages,
});
